Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a failing test for addrparse_header #78

Closed
wants to merge 1 commit into from
Closed

Add a failing test for addrparse_header #78

wants to merge 1 commit into from

Conversation

link2xt
Copy link
Contributor

@link2xt link2xt commented Jul 31, 2020

Mailbox name is only decoded if it is first in the list. In the test,
the second mailbox name is not decoded.

Mailbox name is only decoded if it is first in the list. In the test,
the second mailbox name is not decoded.
@@ -1062,5 +1062,26 @@ mod tests {
.unwrap()
)])
);

let (parsed, _) = crate::parse_header(
b"To: foo <foo@example.org>,?UTF-8?B?Zm9v8J+Qm2Jhcg==?= <bar@example.org>",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentional that there's no = between the , and the ?UTF bits? Because that's a pretty bad spec violation and I wouldn't want to try and detect that. Even if I add the =, mailparse doesn't handle this correctly, so there's still a bug that I need to fix, but I wanted to confirm that your original thing has the = character and the omission here is a typo.

@staktrace
Copy link
Owner

I pushed a fix for the case where there is an = between the , and ?UTF8 but I'm still curious to know if the original scenario you saw was missing the =.

I'm going to close this PR since I took this patch and pushed it along with my fix; I made some tweaks to it but left you as the author on it.

@staktrace staktrace closed this Aug 1, 2020
@link2xt
Copy link
Contributor Author

link2xt commented Aug 1, 2020

No, missing = is my mistake while trying to minimize the example :/

@link2xt link2xt deleted the addrparse-decode-second branch August 1, 2020 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants